#pragma once
#include "../Core/Color.h"


namespace Renderer
{
	enum class SourceBlendingFactor
	{
		Zero,
		One,
		SourceAlpha,
		OneMinusSourceAlpha,
		DestinationAlpha,
		OneMinusDestinationAlpha,
		DestinationColor,
		OneMinusDestinationColor,
		SourceAlphaSaturate,
		ConstantColor,
		OneMinusConstantColor,
		ConstantAlpha,
		OneMinusConstantAlpha
	};

	enum class DestinationBlendingFactor
	{
		Zero,
		One,
		SourceColor,
		OneMinusSourceColor,
		SourceAlpha,
		OneMinusSourceAlpha,
		DestinationAlpha,
		OneMinusDestinationAlpha,
		DestinationColor,
		OneMinusDestinationColor,
		ConstantColor,
		OneMinusConstantColor,
		ConstantAlpha,
		OneMinusConstantAlpha
	};

	enum class BlendEquation
	{
		Add,
		Minimum,
		Maximum,
		Subtract,
		ReverseSubtract
	};

	class Blending
	{
	public:
		Blending()
		{
			Enabled = false;
			SourceRGBFactor = SourceBlendingFactor::One;
			SourceAlphaFactor = SourceBlendingFactor::One;
			DestinationRGBFactor = DestinationBlendingFactor::Zero;
			DestinationAlphaFactor = DestinationBlendingFactor::Zero;
			RGBEquation = BlendEquation::Add;
			AlphaEquation = BlendEquation::Add;
			Color = Core::Color::FromArgb(0, 0, 0, 0);
		}

		~Blending()
		{
		}

		bool Enabled;
		SourceBlendingFactor SourceRGBFactor;
		SourceBlendingFactor SourceAlphaFactor;
		DestinationBlendingFactor DestinationRGBFactor;
		DestinationBlendingFactor DestinationAlphaFactor;
		BlendEquation RGBEquation;
		BlendEquation AlphaEquation;
		Core::Color Color;
	};
}